// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLObject;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.List;
#pragma once
#include "SQLPrivilegeStatement.h"

class SQLGrantStatement : virtual public SQLPrivilegeStatement
{
public:
  // mysql
  SQLExpr_ptr maxQueriesPerHour;
  SQLExpr_ptr maxUpdatesPerHour;
  SQLExpr_ptr maxConnectionsPerHour;
  SQLExpr_ptr maxUserConnections;

  BOOL_ptr adminOption;

  SQLExpr_ptr identifiedBy;
  string_ptr identifiedByPassword;

  BOOL_ptr withGrantOption;

  SQLGrantStatement();

  SQLGrantStatement(DbType_ptr dbType);
  SHAREDOBJECT(SQLGrantStatement);

  // @Override
  void accept0(SQLASTVisitor_ptr visitor);

  // @Override
  SQLObject_list_ptr getChildren();

  SQLObjectType_ptr getResourceType();

  void setResourceType(SQLObjectType_ptr resourceType);

  SQLExpr_ptr getMaxQueriesPerHour();

  void setMaxQueriesPerHour(SQLExpr_ptr maxQueriesPerHour);

  SQLExpr_ptr getMaxUpdatesPerHour();

  void setMaxUpdatesPerHour(SQLExpr_ptr maxUpdatesPerHour);

  SQLExpr_ptr getMaxConnectionsPerHour();

  void setMaxConnectionsPerHour(SQLExpr_ptr maxConnectionsPerHour);

  SQLExpr_ptr getMaxUserConnections();

  void setMaxUserConnections(SQLExpr_ptr maxUserConnections);

  BOOL_ptr isAdminOption();

  void setAdminOption(BOOL_ptr adminOption);

  SQLExpr_ptr getIdentifiedBy();

  void setIdentifiedBy(SQLExpr_ptr identifiedBy);

  string_ptr getIdentifiedByPassword();

  void setIdentifiedByPassword(string_ptr identifiedByPassword);

  BOOL_ptr getWithGrantOption();

  void setWithGrantOption(BOOL_ptr withGrantOption);
  virtual SQLObject_ptr clone()
  {
    SQLObject_ptr clone_tmp = std::shared_ptr<SQLGrantStatement>(new SQLGrantStatement());
    std::shared_ptr<SQLGrantStatement> x = std::dynamic_pointer_cast<SQLGrantStatement>(clone_tmp);
    return x;
  }
};
